package com.examplehub.basics.oop;

public class SetterGetter {
  private String name;
  private int age;

  public void setName(String name) {
    this.name = name;
  }

  public void setAge(int age) {
    if (age < 0 || age > 150) {
      throw new IllegalArgumentException("invalid age:" + age);
    }
    this.age = age;
  }

  public String getName() {
    return name;
  }

  public int getAge() {
    return age;
  }
}
